﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'roleFindByName')
	BEGIN
		DROP  Procedure  roleFindByName
	END
GO

-- =============================================
-- Author:		Ricardo Sosa
-- Create date: 09/03/2009
-- Description:	Gets the role information by name
-- =============================================
CREATE PROCEDURE [dbo].[roleFindByName] 
	-- Add the parameters for the stored procedure here
	@role_name VARCHAR(50),
	@app_id INT
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT *
	FROM lit_rol
	WHERE lit_rol_nombre = @role_name
	AND lit_aplicacion_id = @app_id;
END
GO